package models

import (
	"gorm.io/gorm"
	"time"
)

// 用户会员信息
type UserMemberInformation struct {
	Id              uint64         `gorm:"column:id;type:bigint UNSIGNED;primaryKey;not null;" json:"id"`
	UserId          int32          `gorm:"column:user_id;type:int;default:NULL;" json:"user_id"`
	UserGrowthValue string         `gorm:"column:user_growth_value;type:varchar(255);comment:成长值;default:NULL;" json:"user_growth_value"` // 成长值
	UserLevel       string         `gorm:"column:user_level;type:varchar(255);comment:用户级别;default:NULL;" json:"user_level"`             // 用户级别
	CreatedAt       time.Time      `gorm:"column:created_at;type:datetime(3);default:CURRENT_TIMESTAMP(3);" json:"created_at"`
	UpdatedAt       time.Time      `gorm:"column:updated_at;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" json:"updated_at"`
	DeletedAt       gorm.DeletedAt `gorm:"column:deleted_at;type:datetime(3);default:NULL;" json:"deleted_at"`
}

func (u *UserMemberInformation) TableName() string {
	return "user_member_information"
}
